home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
comm
/
mebbs
/
outche08.lha
/
OutCheck
/
OutChecker.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-08-04
|
4KB
|
158 lines
/* */
parse arg LineNumber
signal on ERROR
options results
DoorName = "OutCheck"
if( ~show( 'l', "mebbsarexx.library" ) )then do
say "Opening mebbsarexx.library"
if( ~addlib( "mebbsarexx.library", 0, -30, 0 ) )then do
say "Could not open library"
exit 10
end
end
CLS = d2c(12)
BLA = '
'
RED = '
'
GRE = '
'
YEL = '
'
BLU = '
'
PUR = '
'
CYA = '
'
WHI = '
'
call GetVar DoorName,LineNumber,1
username = result
username = translate(username,"_"," ")
a=1
call open(mes,'Doors:OutCheck/OutNames.cfg','R')
do until eof(mes)
mes.a = readln(mes)
mes.a = UPPER(mes.a)
a=a+1
end
call close(mes)
b=1
do until b = a
if mes.b = username then signal NOTYET
b=b+1
end
string = cls
call output ; string=yel||"----------------------------------------------------------"||whi
call output ; string=" OutBound Checker v0.8Beta - (c) Mikael Johansson M6005"
call output ; string=yel||"----------------------------------------------------------"||whi
call output ; string=" "
call output ; string=red||" You are NOT, a Node or a Point Under Ankeborg."
call output ; string=" "
call output ; string=yel||"----------------------------------------------------------"||whi
call output ; string=" "
call output
call HotKey DoorName,LineNumber,"Press any key "
call Exit_Door DoorName,LineNumber
exit 0
NOTYET:
string = cls
call output ; string=yel||"----------------------------------------------------------"||whi
call output ; string=" OutBound Checker v0.8Beta - (c) Mikael Johansson M6005"
call output ; string=yel||"----------------------------------------------------------"||whi
call output ; string=" "
call output ; string=" Checking Outbound Directory, Please Wait...."
call output ; string=" "
call output ; string=yel||"----------------------------------------------------------"||whi
call output
/* Checking Point Nr And Names */
call open(point,'Doors:OutCheck/OutCheck.cfg','R')
call seek(point,0,'B')
nrpoin=readln(point)
t=0
do until t = nrpoin
t=t+1
node.t = readln(point)
y = WORDS(node.t)
point.t = WORD(node.t,1)
first = WORD(node.t,2)
last = WORD(node.t,3)
name.t = First||" "||last
end
call close(point)
/* Makeing List of out dir */
filelist = SHOWDIR('outbound:','F')
n = WORDS(filelist)
n=n+1
m=0
BEGIN:
do until m = n
m=m+1
exte.m = "" ; file.m = ""
file.m = WORD(filelist,m)
exte.m = RIGHT(file.m,3)
if exte.m = "" then call END_IT
if exte.m = "FLO" then SIGNAL BEGIN
if exte.m = "HLO" then SIGNAL BEGIN
if exte.m = "CLO" then SIGNAL BEGIN
if exte.m = "TIC" then SIGNAL BEGIN
if exte.m = "LHA" then SIGNAL BEGIN
if exte.m = "LZH" then SIGNAL BEGIN
if exte.m = "TXT" then SIGNAL BEGIN
if exte.m = "ARC" then SIGNAL BEGIN
if exte.m = "ARJ" then SIGNAL BEGIN
if exte.m = "ZIP" then SIGNAL BEGIN
filestring = STATEF('outbound:'||file.m)
byte.m = WORD(filestring,2)
file.m = LEFT(file.m,18)
byte.m = LEFT(byte.m,6)
node.m = TRANSLATE(file.m,"","ABCDEFGHIJKLMNOPQRSTUVWXYZ.")
node.m = STRIP(node.m,"T")
if word(node.m,5) = "1" then node.m = DELSTR(node.m,13)
node.m = STRIP(node.m,"T")
node.m = TRANSLATE(node.m,"."," ")
t=0 ; name=""
do until t = nrpoin
t=t+1
if point.t = node.m then name = name.t
end
string="File: "||gre||file.m||whi||" Byte(s): "||gre||byte.m||whi||" Node: "||gre||node.m||whi||" "||name
call output
END
END_IT:
string=yel||"----------------------------------------------------------"||whi
call output ; string=" "
call output ; string=" That was all in the OutBound: dir"
call output ; string=" "
call output ; string=" "
call output
call HotKey DoorName,LineNumber,"Press any key "
call Exit_Door DoorName,LineNumber
exit 0
ERROR:
call Exit_Door DoorName,LineNumber
exit 10
output:
call message DoorName,LineNumber,string,1
return